def modify_list(l):
    i = 0
    while i < len(l):
        if l[i]%2 == 0:
            print('l[i] befor>>>', l[i])
            l[i] = l[i]//2
            i += 1
        else:
            l.remove(l[i])

lst = [20, 3, 4, 5, 6, 22, 100, 1, 0]
modify_list(lst)
print(lst)

